home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / lisp / wgdb-42.lha / wgdb-4.2 / gdb / nindy-share / Makefile < prev    next >
Makefile  |  1992-09-11  |  3KB  |  100 lines

  1. #-----------------------------------------------------------------------------
  2. # Makefile for toolib.a -- host code shAred by more than one tool
  3. #-----------------------------------------------------------------------------
  4.  
  5. RANLIB    = ranlib
  6.  
  7. # The following lines should be uncommented for system V (i386v).
  8. #__i386v__#USG = -DUSG
  9. #__i386v__#SYSV_INCL = ${IPATH}/sysv.h
  10. #__i386v__#RANLIB = echo >/dev/null
  11.  
  12. # The following line should be uncommented for HP-UX
  13. #__hp9000__#USG = -DUSG
  14. #__hp9000__#SYSV_INCL = ${IPATH}/sysv.h
  15. #__hp9000__#RANLIB = echo >/dev/null
  16.  
  17. # Essential under System V, harmless elsewhere
  18. SHELL = /bin/sh
  19.  
  20. #'HOST' will be defined in the host-specific makefile by 'make make'
  21.  
  22. TARG    = toolib.a
  23. OPT    = -g
  24. IPATH    = ../../include
  25. CFLAGS  = ${OPT} ${USG} -I${IPATH} -DHOST=\"${HOST}\"
  26. OBJS    = coffstrip.o nindy.o ttybreak.o ttyflush.o Onindy.o
  27.  
  28. ${TARG}: ${OBJS} VERSION
  29.     make ver960.o
  30.     rm -f ${TARG}
  31.     ar cvr ${TARG} ${OBJS} ver960.o
  32.     ${RANLIB} ${TARG}
  33.  
  34. coffstrip.o:    ${IPATH}/b.out.h ${IPATH}/coff.h ${IPATH}/sysv.h
  35. nindy.o:    ${IPATH}/block_io.h ${IPATH}/env.h ${IPATH}/sysv.h
  36. nindy.o:    ${IPATH}/ttycntl.h ${IPATH}/wait.h
  37. ttybreak.o:    ${IPATH}/ttycntl.h
  38. ttyflush.o:    ${IPATH}/ttycntl.h
  39. Onindy.o:    ${IPATH}/block_io.h ${IPATH}/env.h ${IPATH}/sysv.h
  40. Onindy.o:    ${IPATH}/ttycntl.h ${IPATH}/wait.h
  41.  
  42.  
  43. #-----------------------------------------------------------------------------
  44. #        'STANDARD' GNU/960 TARGETS BELOW THIS POINT
  45. #
  46. # 'VERSION' file must be present and contain a string of the form "x.y"
  47. #-----------------------------------------------------------------------------
  48.  
  49. ver960.c: FORCE
  50.     rm -f ver960.c
  51.     echo "char toolib_ver[]= \"${TARG} `cat VERSION`, `date`\";" > ver960.c
  52.  
  53.  
  54. # This target should be invoked before building a new release.
  55. # 'VERSION' file must be present and contain a string of the form "x.y"
  56. #
  57. roll:
  58.     @V=`cat VERSION`        ; \
  59.     MAJ=`sed 's/\..*//' VERSION`    ; \
  60.     MIN=`sed 's/.*\.//' VERSION`    ; \
  61.     V=$$MAJ.`expr $$MIN + 1`    ; \
  62.     rm -f VERSION            ; \
  63.     echo $$V >VERSION        ; \
  64.     echo Version $$V
  65.  
  66. # Dummy target to force execution of dependent targets.
  67. #
  68. FORCE:
  69.  
  70. # 'G960BASE' will be defined at invocation
  71. #
  72. install:
  73.     make ${TARG}
  74.     mv -f ${TARG} ${G960BASE}/lib
  75.  
  76. clean:
  77.     rm -f ${TARG} *.o core
  78.  
  79. # Target to uncomment host-specific lines in this makefile.  Such lines must
  80. # have the following string beginning in column 1: #__<hostname>__#
  81. # Original Makefile is backed up as 'Makefile.old'.
  82. #
  83. # Invoke with:  make make HOST=xxx
  84. #
  85. make:
  86.     -@if test $(HOST)x = x ; then \
  87.         echo 'Specify "make make HOST=???"'; \
  88.         exit 1; \
  89.     fi ; \
  90.     grep -s "^#The next line was generated by 'make make'" Makefile; \
  91.     if test $$? = 0 ; then    \
  92.         echo "Makefile has already been processed with 'make make'";\
  93.         exit 1; \
  94.     fi ; \
  95.     mv -f Makefile Makefile.old; \
  96.     echo "#The next line was generated by 'make make'"     >Makefile ; \
  97.     echo "HOST=$(HOST)"                    >>Makefile ; \
  98.     echo                            >>Makefile ; \
  99.     sed "s/^#__$(HOST)__#//" < Makefile.old            >>Makefile
  100.